﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Krile.Forms.Dialogs.Show
{
    public partial class KeyAssignViewer : Form
    {
        public KeyAssignViewer()
        {
            InitializeComponent();
        }

        private void KeyAssignViewer_Load(object sender, EventArgs e)
        {
            var array = Core.KeyAssign.AssignDataArray;
            foreach (var i in array)
            {
                TreeNode node = new TreeNode("Key:" + Enum.Format(typeof(Keys), i.LinkedKeys, "G") +
                (i.EnableOnTextBox ? "(*)" : "" ));
                foreach (var m in i.InvokeMethodDatas)
                {
                    node.Nodes.Add(m.Description);
                }
                assignTree.Nodes.Add(node);
            }
            assignTree.ExpandAll();
        }
    }
}
